// 7_7.c  Passing Addresses to a Function
#include <stdio.h>

int main()
{
    void newval(float *); /*prototype with a pointer parameter*/
    float testval;

    printf("\nEnter a number: ");
    scanf("%f", &testval);

    printf("\nFrom main(): The vaule in testval is : %5.2f \n", testval);
    newval(&testval); /*call the function*/

    printf("\nFrom main(): The vaule in testval has been changed to : %5.2f \n", testval);

    return 0;
}

void newval(float *xnum) /*function header using a pointer parameter*/
{
    printf("\nFrom newval(): The value pointed to by xnum is: %5.2f \n", *xnum);
    *xnum = *xnum + 20.2;
}